package com.czk.model.mediator;

import java.util.HashMap;

/**
 * @Author:ChenZhangKun
 * @Date: 2020/5/13 21:40
 */
public class ConcreateMediator extends Mediator {
    // 存储同事
    private HashMap<String,Colleague> colleagueHashMap;
    //
    private HashMap<String,String> interMap;

    @Override
    public void register(String name, Colleague colleague) {
        colleagueHashMap.put(name,colleague);
        if (colleague instanceof TV){
            interMap.put("tv",name);
        }else if (colleague instanceof CoffeeMachine){
            interMap.put("coffee",name);
        }
    }

    @Override
    public void getMessage(int stateChange, Colleague colleague) {

    }

    @Override
    public void sendMessage() {

    }
}
